﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Whoever.Website.Site
{
    public partial class ServicesMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadControls();
        }

        protected void LoadControls()
        {
            if (Master != null)
            {
                var homeButton = ((Site)Master).GetControl("Services");
                homeButton.Style.Add("border-top", "1px solid #4ba7d7");
            }
        }

        public System.Web.UI.WebControls.Button GetControl(String control)
        {
            var emptyButton = new Button();
            switch (control)
            {
                case "Software":
                    return this.ButtonSoftware;
                case "Design":
                    return this.ButtonDesign;
                case "Tecnology":
                    return this.ButtonTecnology;
                case "Utilities":
                    return this.ButtonUtilities;
                default:
                    return emptyButton;
            }
        }
    }
}